package com.flow.modules.dingtalk.service;

import com.dingtalk.api.response.*;

import java.util.List;

/**
 * @author liuledong
 * @description: TODO
 * @date 2023/4/21 15:28
 */
public interface DingTalkService {

    /**
     * 获取accessToken
     * @return
     * @throws Exception
     */
    String getAccessToken() throws Exception;

    /**
     * 根据accessToken获取部门列表
     * @param accessToken
     * @param deptId
     * @return
     */
    OapiV2DepartmentListsubResponse getDeptListByAccessToken(String accessToken,Long deptId);

    /**
     * 根据accessToken、deptId获取部门详细信息
     * @param accessToken
     * @param deptId
     * @return
     */
    OapiV2DepartmentGetResponse getDeptInfoById(String accessToken, Long deptId);

    /**
     * 根据accessToken获取员工人数
     * @param accessToken
     * @param onlyActive
     * @return
     */
    OapiUserCountResponse getUserCountByAccessToken(String accessToken,Boolean onlyActive);

    /**
     * 获取部门用户基础信息
     * @param accessToken
     * @param deptId
     * @param cursor
     * @param size
     * @return
     */
    OapiV2UserListResponse getUserInfoByDepts(String accessToken,Long deptId,Long cursor,Long size);

    /**
     * 根据员工id获取员工详细信息
     * @param accessToken
     * @param userId
     * @return
     */
    OapiV2UserGetResponse getUserInfoById(String accessToken, String userId);

    /**
     *
     * 获取考勤打卡详情
     *
     * @param accessToken
     * @param userIds
     * @param checkDateFrom
     * @param checkDateTo
     * @return OapiAttendanceListRecordResponse
     */
    OapiAttendanceListRecordResponse getAttendanceByUserIds(String accessToken, List<String> userIds,
                                                            String checkDateFrom, String checkDateTo);

}
